Memphis Application Help

Memphis: Early capital of ancient Egypt, on W. bank of Nile S. of Cairo. & Tennessee USA on Mississippi, Martin Luther King assassinated 1968.

About MemFS 2.11

Memphis is a replacement RAM-based filing system (with lots of knobs on!) that uses the System Sprite area rather than the RAM disc area. In particular it provides;

It is ideal for use as a scrap device - this is not set by default in the !Run file, but users who want this feature can easily enable it by editing the !Run file.

Start by running the memfs application, then use it like the ramdisc, except it can be resized with stuff in. It will not work under RISCOS 2.

I am pretty sure that this works, but there may well still be bugs, so please don't commit irreplaceable data to it!

Technical

A nearly full riscos file system, supports everything except (I think):

The error message "Lost inode" means that MemFS was unable to find a sprite it expected to. It will use any file structure that it finds already present when it is loaded, so if you want you can save the entire contents with *ssave, and load it again with *sload.

The memfs and memfsfiler modules should work ok when loaded outside the Wimp, and behave as a standard fs/filer pair. The filer needs a sprite called memfs in the wimp sprite pool. Of course, it will be difficult to extend the sprite area when anything is running in single tasking mode.

Some suboptimal algorithms. Unsorted directories are searched linearly :-(

The sources-distribution of memfs comes with 'FSLib' which is an ALF library that provides a very easy interface for writing FileSwitch filing systems. See FSLib docs for more details.

Data Format

This information is only provided to allow you to recover mangled data in extremis. Each file or directory gets an inode number>0. An inode is found either in the sprite mfsXXXXXXXX (XXX the number in hex) or if memfs is hosted, in a file <specialfield>,.X,.X,.X,.X (XXX the number base 32). Directories are composed of 512 byte pages, each page filled with inode number/0-terminated name pairs, each word aligned, all except the last terminated by -3. Inode 0 is special, and holds the properties of all other inodes. It is a table of entries, each 6 words: load, exec, length, allocated, attr, parentinode. Entry 0 has parentinode indicating a chain of free inodes linked by then parentinode entries.

Dedications

This project was written in C and produced using the FSinC stuff from Jon Roach of Acorn, as heavily hacked by me.

The idea of using the sprite area as a dynamic method of allocating space came to Nicko Van Someren, in a flash of insight during a conversation we had. This was several months after I had given up on an attempt at this using the ramfs dynamic area due to the evil that riscos perpetrates when one calls ChangeDynamic area on that, and settled for the horrible solution of the RMA, which would never shrink.

It is dedicated to debugging via printf :-(

Reporting problems

Please read this BEFORE sending me any reports of problems! With a complex (and buggy!) program like !Memphis, I get a fair few email messages of the form "I ran your !Memphis, and it didn't work - what am I doing wrong?"

PLEASE don't send me such unhelpful comments! Really, I need to know as much of the following as you can provide in the initial email;

Distribution

This software may be freely redistributed, so long as only a reasonable copying or media charge is made, and all files I distribute are included. I retain copyright to the code. Commercial (including magazine) distribution, or distributing modified versions of this please contact me - I am normally happy for it to be reused in other free software, but like to avoid deviant versions of mine causing trouble.

I am not asking for money, but if you like and use it I would be surprised and amazed by any contributions, and you will receive a disc with latest versions on. (>£10, say)

Brian Brunswick                        bdb@eidos.co.uk (Internet)
Fairview                                         
Avenue des Hirondelles
Pool-in-WharfeDale
Leeds
LS21 1EY

Versions later than 2.00

Because Brian is now out 'in the real world' I (Nick Smith) am acting as a first line of support for !Memphis. I have tidied it up from the v2 beta release to the public release version, and will improve the program as I get feedback from users, etc. In particular I've done masses of work on the desktop filer application. Currently, Brian wrote 90% of the actual software - so send him all that money in gratitude !

Please email or snail-mail me comments, bug reports, requests for new features, etc. and I will hopefully have the time to deal with them. If you make any modifications to the code, please send them to me rather than giving out copies - I would like to coordinate new releases. Thanks.

I can be contacted at the following address:

Nick Smith                             nas@bi.org (Internet email)
ANT Ltd                                http://bi.org/~nas/
PO Box 300
Cambridge
CB1 2EG

Revision history

Modifications to v2.00 (02-Sep-92) [bdb betarelease]
- Lots of new (broken) features added :-(

Modifications to v2.01 (30-Mar-93)
- Improved documention; added installation instructions, updated info, added revision history, etc
- removed compilation dependency on having brian's harddrive 8-)
- did some slightly better !Sprites, with !Sprites22

Modifications to v2.02 (04-Apr-93)
- Large amount of work done to filer (no separate history) Loads of new features, including; info dbox, create dbox for easy creation of memdisc files on disc (uses dragasprite!), doesn't do *snew upon quit anymore but just deletes memfs sprite files, filer windows closed when memfsfiler quit, desktop save support (saves spritearea to scrap file inside !Memphis), can adjust click on menu, etc ...
- MemFSFiler made RO 2.00 incompatible, but it is worth it!
- Mods to MemFS sources to get compiling with new FSLib code, still some work required for it to actually function though !
- Memphis found in Tennessee, USA ;-)

Modifications to v2.03 (15-May-93)
- Got new memfs sources from bdb - now compiles & runs happily with latest fslib. desktop free support broken ...
- Fixed freespace (needed enabling from fslib sources)

Modifications to v2.04 (06-Jul-93)
- Fixed templates file
- New 3D-look templates - autoloads correct one based on setting of '3D look' CMOS byte
- Sent filetype/FS number allocation request to Acorn Customer Support

Modifications to v2.05 (12-Aug-93)
- Improved documentation + reorganized 'todo' file for next public release version
- Emailed Acorn customer services regarding distribution of FSLib sources + patched cmhg program
- Enabled query message on quit of memfiler when there is data in the sprite area
- Shaved around 2-3Kb off the combined module size by recompiling with '-ff' (no embedded function names). Also done with 'FSLib' library.
- Can now drag objects from the filer straight onto the memfs icon and they are copied (or moved with shift) using m/tasking filer_action
- Filer now has integrated Darren Durbin's 'LockSNEW' module which filters out dangerous *SNew and *Sload commands. Can toggle filtering on/off with *MemProtect/*MemNormal

Modifications to v2.06 (22-Aug-93)
- Got permission to distribute FSLib code from Acorn (yipee!) copyright and disclaimer notices added
- Patch program for cmhg tool added + docs, because we aren't allowed to distribute Acorn binaries without a license

Modifications to v2.07 (24-Aug-93)
- Got an Acorn-allocated FS number (91) and Filetype (&3f1)

Modifications to v2.08 (08-Sep-93) [release]
- Fixed dragasprite (was looking at wrong CMOS bit)
- Corrected memcore filetype
- Got a whole load of new code from Brian - what am I going to do??!
- Fixed major bug in compressed pages code
- Added (c) messages to each source file ReFormatted all text files to Mode 12 screen Improved documentation a little
- Fixed bug with saveas dbox (3D version) *must* be 'Click', not 'Click+Drag' icon type for OK icon
- Vastly improved page compression/decompression routines, and fixed uncompress (I hope!) to stop it bombing out filer_action ...
- Strange problem with system() screwing up Life As We Know It in memfiler - using OS_CLI instead seems to cure the problem!

Modifications to v2.09 (15-Sep-93)
- Pulled templates out of ResourceFS - saves about 2Kb from filer module size
- Added new code to drag sprite on iconbar. Try dragging, drag+SHIFT and drag+CTRL held down

Modifications to v2.10 (14-Oct-96)
- Updated contact details for myself & Brian (long out of date!)
- Recompiled with CallASWI module which replaced the dynamic SWI code in FSLib.s.swiv
- Actually use _kernel_swi() instead of CallASWI (so no dependency on extra modules)
- Now with new 'create' dbox with cancel button (RO3 style guide)
- Create "X-files" files from Create-> menu, not old Memphis (broken) files. This requires the !X-files package to be useful of course, but it is a far far better long filenames/lots of files FS for disc use than Memphis ever was
- Checks for X-file archive already existing before allowing 'create' (don't want to wipe out entire archives so easily!)

Modifications to v2.11 (13-Feb-97)
- Tidying of documentation
- Added warning on predesk shutdown if data in sprite area